package com.hotel.mapper;

import com.hotel.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author 夏智力
 * @FileName userMapper
 * @date 2021/6/21 22:12
 * @Software: IntelliJ IDEA
 */
@Mapper
public interface UserMapper {

    User selectById(int id);

    int insertUser(User user);

    int updateUser(User user);

    int deleteUser(int id);

    /**
     * 通过用户账号查询用户信息
     *
     * @param username
     * @return
     */
    User selectUserByName(@Param("username") String username);
}
